/**
 * 
 */
package com.rst.doc.domain;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author JavaDeamon
 *
 */
@Entity
@Table(name="DOCUMENT_TYPE_DETAILS")
public class DocumentTypeDetailsDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -544712217725971923L;
	private Integer docTypeId;
	private String docTypeName;
	private String docTypeCode;

	private List<DocumentCategoryDetailsDTO> documentCategoryList;

	/**
	 * @return the docTypeId
	 * primary key
	 * contains autogenerated id
	 * length is 10
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="DOC_TYPE_ID", length=10)
	public Integer getDocTypeId() {
		return docTypeId;
	}

	/**
	 * @return the docTypeName
	 * contains doctype name
	 * cannot be null
	 * length is 50
	 */
	@Column(name="DOC_TYPE_NAME", nullable=false, length=50)
	public String getDocTypeName() {
		return docTypeName;
	}

	/**
	 * @return the docTypeCode
	 * contains doctype code
	 * cannot be null
	 * length is 10
	 */
	@Column(name="DOC_TYPE_CODE", nullable=false, length=10)
	public String getDocTypeCode() {
		return docTypeCode;
	}

	/**
	 * @return the documentCategoryList
	 * onetomany mapping with document category details table
	 */
	@OneToMany(targetEntity=DocumentCategoryDetailsDTO.class, mappedBy="docType")
	public List<DocumentCategoryDetailsDTO> getDocumentCategoryList() {
		return documentCategoryList;
	}

	/**
	 * @param docTypeId the docTypeId to set
	 */
	public void setDocTypeId(Integer docTypeId) {
		this.docTypeId = docTypeId;
	}

	/**
	 * @param docTypeName the docTypeName to set
	 */
	public void setDocTypeName(String docTypeName) {
		this.docTypeName = docTypeName;
	}

	/**
	 * @param docTypeCode the docTypeCode to set
	 */
	public void setDocTypeCode(String docTypeCode) {
		this.docTypeCode = docTypeCode;
	}

	/**
	 * @param documentCategoryList the documentCategoryList to set
	 */
	public void setDocumentCategoryList(
			List<DocumentCategoryDetailsDTO> documentCategoryList) {
		this.documentCategoryList = documentCategoryList;
	}
}
